package butines.kraz.state;

import butines.kraz.entity.AbstractState;
import butines.kraz.entity.Unit;


public class UnitHoldState extends AbstractState<Unit> {

	private static final UnitHoldState instance = new UnitHoldState();

	public static UnitHoldState getInstance() {
		return instance;
	}

	@Override
	public void enter(Unit owner) {
		owner.setSpeed(0);
		if (!owner.getSprite().isAnimation("stay")) {
			owner.getSprite().play("stay");
		}
	}

	@Override
	public void execute(Unit owner) {
	}

	@Override
	public void leave(Unit owner) {
	}

}
